import Vue from "vue";
import VueRouter from "vue-router";
import wevue from 'we-vue';
import Vconsole from 'vconsole'
import $ from 'jquery';
import md5 from 'js-md5';
import cookie from  'jquery.cookie';
import 'we-vue/lib/style.css';
import App from "./App.vue";


import login from './page/login.vue';//登录
import index from './page/home.vue';//首页
import storehouse from './page/storehouse';//云仓库
import order from './page/order';//订单
import myhome from './page/my.vue';//我的
import orderWashing from './page/daili/orderWashing.vue';//下单洗涤
import addressList from './page/daili/adressList.vue'; //地址列表
import addressAdd from './page/daili/addressAdd.vue';//添加地址页

import storeAccount  from './page/BD/store.vue';//门店开户
import recommend from './page/recommend.vue';//我的-推荐
import moneybag from './page/money.vue';//钱包

let vConsole = new Vconsole();

Vue.config.productionTip = false;
Vue.prototype.$md5 = md5;
Vue.use(wevue).use(VueRouter);

Vue.use(vConsole)

const routes = [
  {path:'/',component:login},
  // {
  //   path:'/index',
  //   component:index,
  //   children:[
  //     {
  //       path:"/myhome",
  //       component:myhome
  //     },
  //     {
  //       path:"/store",
  //       component:storeAccount
  //     },{
  //       path:"/recommend",
  //       component:recommend
  //     },{
  //     	path:'/moneybag',
  //     	component:moneybag
  //     }
  //   ]
  // },
  {path:'/index',component:index}, //首页 tab
  {path:'/store',component:storeAccount},
  {path:'/storehouse',component:storehouse},//云仓库 tab
  {path:'/order',component:order},//订单tab
  {path:'/myhome',component:myhome}, //我的 tab

  {path:'/orderWashing',component:orderWashing},//下洗涤订单 
  {path:'/addressList', component:addressList},//地址列表
  {path:'/addressAdd', component:addressAdd},//添加地址页

  {path:'/recommend',component:recommend},
  {path:'/moneybag',component:moneybag}

]

const router = new VueRouter({
  mode: 'history',
  routes
})


Vue.prototype.bus = new Vue()

new Vue({
  router,
  render: h => h(App),

}).$mount("#app");